﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using BSDS.Commands.Configuration;
using BSDS.Commands.Mailing;
using BSDS.Core.Intialization;
using BSDS.Core.Infrastructure.Logging;
using MbUnit.Framework;

namespace BSDS.Commands.Tests
{
    // DEV NOTE: PLEASE INSTALL GALLIO MBUNIT AND USE THE ICARUS GUI TEST RUNNER. MAKE SURE ONLY ONE INSTANCE OF VS IS OPEN DURING TESTING --NJH
    public class MailSenderTest
    {
        [Test]
        void Send()
        {
            var configuration = new SmtpConfiguration("ea@grasshills.com", "ethan.allen", "mail.grasshills.com", 26, false, new TimeSpan(0, 0, 10));
            var logger = new Logger("Console", new TraceSource("BSDS.Console"), new List<ILogConsumer>());
            var recipients = new List<string>(); 
            recipients.Add("nhamawi@infusion.com");
            recipients.Add("MMirliani@ethanalleninc.com");
            var mailSender = new MailSender(recipients, configuration, logger);

            mailSender.Send("Ethan Allen BSDS Email Test", "Ethan Allen BSDS Email Test");
        }
    }
}
